﻿#include <iostream>
#include <time.h>
using namespace std;

const int N = 9999;
int ar[9999];
time_t st, et;
int main()
{
	freopen("../data", "r", stdin);
	for (int i = 0; i < N; i++) {
		cin >> ar[i];
	}
	cout << "Read finish\n";
	st = clock();

	for (int i = 0; i < N - 1; i++) {
		for (int j = 0; j < N - i - 1; j++) {
			if (ar[j] > ar[j + 1]) {
				int tm = ar[j];
				ar[j] = ar[j + 1];
				ar[j + 1] = tm;
			}
		}
	}

	et = clock();
	cout << "[";
	for (int i = 0; i < N; i++) {
		cout << ar[i] << ", ";
	}
	cout << "]\nTime: " << (et - st) / 1000 << "ms" << endl;
	return 0;
}
